[PW_SID:1127548] x86: Support shstk via prctl#2282
Conversation
Historically, managing the user-space shadow stack state on x86 has been handled exclusively through the arch_prctl() interface via the ARCH_SHSTK_* operations. However, other architectures (such as arm64 and riscv) do not implement arch_prctl() and instead utilize the newer, arch-agnostic, prctl() interface (i.e. PR_GET_SHADOW_STACK_STATUS and PR_SET_SHADOW_STACK_STATUS). To provide language runtimes, toolchains, and libc implementations with a consistent, cross-architecture interface for managing control-flow integrity, wire up the generic shadow stack prctl handlers for x86. Map the generic PR_SHADOW_STACK_ENABLE, PR_SHADOW_STACK_DISABLE, and PR_SHADOW_STACK_LOCK operations onto the underlying x86 internal CET helper routines. This allows portable userspace applications to toggle or query shadow stack states without relying on architecture-specific system calls, while maintaining backward compatibility with existing arch_prctl() calls. Signed-off-by: Bill Roberts <bill.roberts@arm.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Run the same test suite for arch_prctl, against prctl, to ensure consisteny and correctness between the interfaces. Signed-off-by: Bill Roberts <bill.roberts@arm.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "[1/2] x86/shstk: support via prctl" |
|
Patch 1: "[1/2] x86/shstk: support via prctl" |
|
Patch 1: "[1/2] x86/shstk: support via prctl" |
|
Patch 1: "[1/2] x86/shstk: support via prctl" |
|
Patch 1: "[1/2] x86/shstk: support via prctl" |
|
Patch 1: "[1/2] x86/shstk: support via prctl" |
|
Patch 1: "[1/2] x86/shstk: support via prctl" |
|
Patch 1: "[1/2] x86/shstk: support via prctl" |
|
Patch 1: "[1/2] x86/shstk: support via prctl" |
|
Patch 1: "[1/2] x86/shstk: support via prctl" |
|
Patch 1: "[1/2] x86/shstk: support via prctl" |
|
Patch 1: "[1/2] x86/shstk: support via prctl" |
|
Patch 2: "[2/2] selftests/x86: add generic prctl shadow stack test" |
|
Patch 2: "[2/2] selftests/x86: add generic prctl shadow stack test" |
|
Patch 2: "[2/2] selftests/x86: add generic prctl shadow stack test" |
|
Patch 2: "[2/2] selftests/x86: add generic prctl shadow stack test" |
|
Patch 2: "[2/2] selftests/x86: add generic prctl shadow stack test" |
|
Patch 2: "[2/2] selftests/x86: add generic prctl shadow stack test" |
|
Patch 2: "[2/2] selftests/x86: add generic prctl shadow stack test" |
|
Patch 2: "[2/2] selftests/x86: add generic prctl shadow stack test" |
|
Patch 2: "[2/2] selftests/x86: add generic prctl shadow stack test" |
|
Patch 2: "[2/2] selftests/x86: add generic prctl shadow stack test" |
|
Patch 2: "[2/2] selftests/x86: add generic prctl shadow stack test" |
|
Patch 2: "[2/2] selftests/x86: add generic prctl shadow stack test" |
56b6f30 to
8ca72ef
Compare
60e0882 to
36eafdd
Compare
PR for series 1127548 applied to workflow__riscv__fixes
Name: x86: Support shstk via prctl
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1127548
Version: 1